package com.yupi.usercenter.common;

import lombok.AllArgsConstructor;

/**
 * Classname: ErrorCode
 * Package: com.yupi.usercenter.common
 * Description:
 * 返回错误码
 *
 * @Author Alex Liang
 * @Create 2024/8/18 下午5:07
 * @Version 1.0
 */

public enum ErrorCode {
    SUCCESS(20000, "成功", ""),
    PARAMS_ERROR(4000, "请求参数错误", ""),
    PARAMS_NULL_ERROR(4001,"请求数据为空",""),
    NO_LOGIN(40100, "未登录", ""),
    NO_AUTH(40101, "无权限", ""),
    SYSTEM_ERROR(50000, "系统内部异常", "")
    ;
    /**
     * 状态码
     */
    private final int code;
    /**
     * 状态码描述
     */
    private final String messsage;
    /**
     * 状态码描述（详细描述）
     */
    private final String description;



    ErrorCode(int code, String messsage, String description) {
        this.code = code;
        this.messsage = messsage;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMesssage() {
        return messsage;
    }

    public String getDescription() {
        return description;
    }
}
